wayland: Remove own pointer to the popup parent
authorJonas Ådahl <jadahl@gmail.com>
Tue, 17 Mar 2020 14:26:58 +0000 (15:26 +0100)
committerJonas Ådahl <jadahl@gmail.com>
Wed, 8 Apr 2020 21:32:47 +0000 (23:32 +0200)
It's there already as the GdkSurface::parent, no need to duplicate.

gdk/wayland/gdksurface-wayland.c

index cb4d5cfb68e65296c93e7840b4dad13d5a3ab61c..9b18d199937d3c01ec147718be9613e75c653d4c 100644 (file)
@@ -108,7 +108,6 @@ struct _GdkWaylandSurface
   unsigned int is_drag_surface : 1;
   GdkSurfaceTypeHint hint;
   GdkSurface *transient_for;
-  GdkSurface *popup_parent;
 
   int pending_buffer_offset_x;
   int pending_buffer_offset_y;
@@ -841,8 +840,6 @@ gdk_wayland_surface_dispose (GObject *object)
 
   impl = GDK_WAYLAND_SURFACE (surface);
 
-  g_clear_object (&impl->popup_parent);
-
   if (impl->event_queue)
     {
       GdkWaylandDisplay *display_wayland =
@@ -2439,7 +2436,6 @@ gdk_wayland_surface_create_xdg_popup (GdkSurface     *surface,
       freeze_popup_toplevel_state (surface);
     }
 
-  g_set_object (&impl->popup_parent, parent);
   display->current_popups = g_list_append (display->current_popups, surface);
   if (grab_input_seat)
     {
@@ -2528,9 +2524,8 @@ unmap_popups_for_surface (GdkSurface *surface)
   for (l = display_wayland->current_popups; l; l = l->next)
     {
        GdkSurface *popup = l->data;
-       GdkWaylandSurface *popup_impl = GDK_WAYLAND_SURFACE (popup);
 
-       if (popup_impl->popup_parent == surface)
+       if (popup->parent == surface)
          {
            g_warning ("Tried to unmap the parent of a popup");
            gdk_surface_hide (popup);